<?php

namespace app\common\validate\Project;

use think\Validate;

class ProjectOrder extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'userid' => 'require', //必填
        'addrid' => 'require', //必填
        'projectid' => 'require',
        'createtime' => 'require',
        'status' => 'number|in:-1,-2,-3,0,1,2,3',  //给字段设置范围
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'userid.require'  => '用户信息未知',
        'addrid.require'  => '上门地址未知',
        'projectid.require' => '预约服务未知',
        'createtime.require' => '请选择预约时间',
        'status.in' => '预约订单状态未知',
    ];

    /**
     * 验证场景
     */
    protected $scene = [];
}
